package com.base.cn.platform.os.controller.common;

import com.base.cn.platform.os.common.AdminBaseController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * 后台订单管理
 *
 * @author s.li
 * @create 2018-05-10-13:58
 */
@Controller
@RequestMapping("/admin/common")
public class AdminCommonController extends AdminBaseController {

    /**
     * 导出表格公共弹出页面
     * @param type  1:全部订单 2：销售记录 3退费记录 4.优惠券 5.礼品卡 6.学习记录  7.章节评价明细 8.试卷批阅 9.推广员
     * @return
     * @throws Exception
     */
    @RequestMapping("/openExcelPage")
    public String  openOrderExcelPage(Model model,@RequestParam(value = "type",required = false) Integer type,@RequestParam(value = "id",required = false) BigDecimal id){
        model.addAttribute("type",type);
        model.addAttribute("id",id);
        return "/common/openExportExcel";
    }

}
